package com.iplusbot.api;

public class Robot {

    // 机器人状态
    public final static int ST_INIT = 0;
    public final static int ST_READY = 1;
    public final static int ST_BUSY = 2;
    public final static int ST_CHARGING = 3;
    public final static int ST_FAILURE = 4;

    private int id;
    public int getId() { return this.id; }
    public void setId(int v) { this.id = v; }

    private String alias;
    public String getAlias() { return this.alias; }
    public void setAlias(String v) { this.alias = v; }

    private int run_state;
    public int getRunState() { return this.run_state; }
    public void setRunState(int v) { this.run_state = v; }

    private String nav_state_str;
    public String getNavStateStr() { return this.nav_state_str; }
    public void setNavStateStr(String v) { this.nav_state_str = v; }

    private int mission_id;
    public int getMissionId() { return this.mission_id; }
    public void setMissionId(int v) { this.mission_id = v; }

    private int mission_state;
    public int getMissionState() { return this.mission_state; }
    public void setMissionState(int v) { this.mission_state = v; }

    private String mission_err_msg;
    public String getMissionErrMsg() { return this.mission_err_msg; }
    public void setMissionErrMsg(String v) { this.mission_err_msg = v; }

    private String map_name;
    public String getMapName() { return this.map_name; }
    public void setMapName(String v) { this.map_name = v; }

    private double x;
    public double getX() { return this.x; }
    public void setX(double v) { this.x = v; }

    private double y;
    public double getY() { return this.y; }
    public void setY(double v) { this.y = v; }

    private float battery;
    public float getBattery() { return this.battery; }
    public void setBattery(float v) { this.battery = v; }


    @Override
    public String toString() {
        return String.format("Robot{id:%d, alias:%s, state:%d, nav_state:%s, mission_id:%d, mission_state:%d, mission_err:%s, map_name:%s, x:%.2f, y:%.2f, battery:%.1f%%}", 
        id, alias, run_state, nav_state_str, mission_id, mission_state, mission_err_msg, map_name, x, y, battery);
    }
}
